/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author houfukude
 */
public class NewClassT1 {

 public static void main(String[] args)
 {

  String str = "1111<p>aaa.<p>bbb.444444<p>ccc.3333<p>ddd.333333";
  String[] m=str.split(".");
  str=m[0]+"."+m[1]+".";
  System.out.print(str);
 }
}

/*
 * String[] m = br.readln();
 * m[0]
 * m[1]
 */